package krt.wid.gslzs.adpater;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

import krt.wid.gslzs.R;
import krt.wid.gslzs.bean.NewBean;

/**
 * Created by admin on 2018/5/11.
 */

public class RecyclerNewsAdpater extends BaseQuickAdapter<NewBean,BaseViewHolder>{
    public RecyclerNewsAdpater(@Nullable List<NewBean> data) {
        super(R.layout.sy_item_new, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, NewBean item) {
        helper.setText(R.id.sy_title, item.getTheme()); //标题
        helper.setText(R.id.sy_time,item.getUpdateTime());//创建时间
        helper.setImageResource(R.id.sy_image,R.mipmap.showimg1); //新闻图片

    }
}
